//    Copyright (C) Kherty.  All rights reserved.
using System.Diagnostics.Contracts;

namespace OpenLS.Spreadsheet.Expressions
{
	class SharedExpression
	{
		public SharedExpression (RangeAddress r, Expression topLeftExpression)
		{
			Contract.Requires(topLeftExpression != null);
			Address = r;
			_topLeftExpression = topLeftExpression;
		}
		private RangeAddress  _address;

		public RangeAddress  Address
		{
			get { return _address; }
			private set { _address = value; }
		}
		private Expression _topLeftExpression;
		public Expression TopLeftExpression
		{
			get { return _topLeftExpression; }
		}
	
	   
		internal void Offset(CellRelativeAddress cellRelativeAddress)
		{
			_address = Address + cellRelativeAddress;
			//\\_topLeftExpression = TopLeftExpression.Offset(cellRelativeAddress);
		}
	}
	
}
